package com.project.mapper;

import com.project.bean.ManBean;
import org.apache.ibatis.annotations.*;

import java.time.LocalDate;
import java.util.List;

public interface IManMapper {
    @Insert("INSERT INTO Man(t_name,t_birthday)values(#{name},#{birthday})")
    public void add(ManBean manBean);

    @Delete("delete from Man where t_manId=#{id}")
    public void del(int id);

    @Update("update Man set t_birthday=#{birthday} where t_manId = #{id}")
    public void update(@Param("id") int id ,@Param("birthday") LocalDate birthday);
    @Select("select * from Man")
    @ResultMap("manMap")
    public List<ManBean> findAll();
}
